Description
This sample saves a draft document to xml and then creates a new order based on the xml.
Private Sub cmdDraftToOrder_Click()
    Dim pDraft As SAPbobsCOM.Documents
    Set pDraft = vCmp.GetBusinessObject(oDrafts)
    Dim pOrder As SAPbobsCOM.Documents
    vCmp.XmlExportType = xet_ExportImportMode
    vCmp.XMLAsString = False
    pDraft.GetByKey (3)
    pDraft.SaveXML ("c:\drafts.xml")
   Â
   Â
   Â
   Â
   Â
   Â
    Set pOrder = vCmp.GetBusinessObjectFromXML("c:\drafts.xml", 0)
    pOrder.Add
End Sub |